<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>关于class知识点</h1>
    <script>
        class Person {
            constructor(name,age,sex) {
                this.name = name;
                this.age = age;
                this.sex = sex;
            }
            jump(){
                console.log('我沿着长长的街');
            }
            static run(){
                console.log('为你付出一切');
            }
            static color = 'green'
        }
        let tom = new Person('tom',20,'男');
        console.log(tom);


        class Students extends Person{
            constructor(name,age,sex,hobby){
                super(name,age,sex);
                this.hobby = hobby
            }
            jump(){
                super.jump();

            }
            static run(){
                super.run();
            }
        }
        let kang = new Students('kang',16,'男','帅帅气气');
        console.log(kang);
        kang.jump();
        Students.run();

        
    </script>
</body>
</html>